<?php
/**
 * api 订单模型类
 * @Author: phpzhi <phpzhi@qq.com><https://www.phpzhi.com>
 * @Date: 2019/11/8 12:59
 */

namespace app\api\model\goods;

use app\api\model\goods\Goods;
use app\common\model\goods\GoodsSpec;
use think\Db;

class GoodsOrder extends \app\common\model\order\GoodsOrder
{
    public static function getOrderPriceInfo(&$cartInfo)
    {
        $res = GoodsSpec::get(['goods_id' => $cartInfo['goods_id'], 'spec_sku_id' => $cartInfo['goods_spec_value']]);

        return $cartInfo['cart_num'] * $res['goods_price'];
    }
}